style: code viewer
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { colorPrimary } from '@/config/theme';
|
||||||
import useUserSettings from '@/hooks/use-user-settings';
|
import useUserSettings from '@/hooks/use-user-settings';
|
||||||
import { Button, ColorPicker } from 'antd';
|
import { Button, ColorPicker } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@@ -14,12 +15,22 @@ const CustomUI: React.FC = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleReset = () => {
|
||||||
|
setUserSettings({
|
||||||
|
...userSettings,
|
||||||
|
colorPrimary: colorPrimary
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>Custom UI Component</h1>
|
<h1>Custom UI Component</h1>
|
||||||
<Button type="primary">主题色</Button>
|
<Button type="primary">Brand Color</Button>
|
||||||
<div>
|
<div className="flex-center gap-16 m-t-16">
|
||||||
<ColorPicker onChange={handleOnChange} format="hex"></ColorPicker>
|
<ColorPicker onChange={handleOnChange} format="hex"></ColorPicker>
|
||||||
|
<Button type="primary" onClick={handleReset}>
|
||||||
|
Reset
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user