---
title: 组件位置
group:
  path: /Editor
  title: 编辑器项
---

## 颜色选择器  


```jsx  
import React from 'react';  
import Position from '@dndc/pudge-basic/es/basic-editor/position';  
const config = {
    name: {
      left: 'left',
      top: 'top',
      zIndex: 'zIndex',
      xAlign: 'xAlign',
      yAlign: 'yAlign',
    },
    group:{
      isOpen: true,
      label:'位置'
    }
};
const onChange = (key, value)=>{
  console.log('选择了背景',key, value);
};

const propValue = {
  left:'50%',
  top:'50%'
};
export default () => <Position config={config} propValue={propValue} onChange={onChange} />;  
```  

