msyavuz commented on code in PR #34772:
URL: https://github.com/apache/superset/pull/34772#discussion_r2288841473
##########
superset-frontend/packages/superset-ui-core/src/components/ColorPicker/index.tsx:
##########
@@ -20,10 +20,33 @@ import {
ColorPicker as AntdColorPicker,
type ColorPickerProps as AntdColorPickerProps,
} from 'antd';
+import { css, Global } from '@emotion/react';
// Re-export the AntD ColorPicker as-is for themeable usage
export type ColorPickerProps = AntdColorPickerProps;
-export const ColorPicker = AntdColorPicker;
+export const ColorPicker: React.FC<ColorPickerProps> = props => (
+ <>
+ <Global
+ styles={css`
+ .ant-slider.ant-color-picker-slider.ant-slider-horizontal {
+ margin: 11px 5px;
+ }
+ .ant-color-picker
+ .ant-color-picker-input-container
+ .ant-color-picker-slider-alpha,
+ .ant-color-picker
+ .ant-color-picker-input-container
+ .ant-color-picker-alpha-input,
+ .ant-color-picker
+ .ant-color-picker-input-container
+ .ant-color-picker-format-select {
+ display: inline-flex;
+ }
+ `}
+ />
+ <AntdColorPicker {...props} />
+ </>
+);
Review Comment:
Global styles for this is not the right approach, you can use css prop but i
would suggest inspecting why it doesn't behave like this antd itself without
customization
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]