---
title: 背景
group:
  path: /Editor
  title: 编辑器项
---

## 颜色选择器  


```jsx  
import React from 'react';  
import Background from '@dndc/pudge-basic/es/basic-editor/background';  
const config = {
  name: {
      backgroundColor: 'backgroundColor',
      backgroundImage: 'backgroundImage',
      backgroundPosition: 'backgroundPosition',
      backgroundSize: 'backgroundSize',
      backgroundRepeat: 'backgroundRepeat',
    },
  label: '背景',
  // group:{
  //   label:'背景',
  // }
};
const onChange = (key, value)=>{
  console.log('选择了背景',key, value);
};
const style = {
    fontSize:16,
};  
const data = {
  type:'Button',
  style
}
export default () => <Background config={config} data={data} />;  
```  

