Skip to content

Commit 21928c4

Browse files
uncommented CustomStyleHooks
1 parent ab194cd commit 21928c4

File tree

6 files changed

+21
-41
lines changed

6 files changed

+21
-41
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "feat(react-color-picker): added CustomStyleHooks",
4+
"packageName": "@fluentui/react-shared-contexts",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/react-color-picker/library/src/components/AlphaSlider/AlphaSlider.tsx

+3-10
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,17 @@ import { useAlphaSlider_unstable } from './useAlphaSlider';
44
import { renderAlphaSlider_unstable } from './renderAlphaSlider';
55
import { useAlphaSliderStyles_unstable } from './useAlphaSliderStyles.styles';
66
import type { AlphaSliderProps } from './AlphaSlider.types';
7+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
78

89
/**
9-
* AlphaSlider component - TODO: add more docs
10+
* AlphaSlider component
1011
*/
1112
export const AlphaSlider: ForwardRefComponent<AlphaSliderProps> = React.forwardRef((props, ref) => {
1213
const state = useAlphaSlider_unstable(props, ref);
1314

1415
useAlphaSliderStyles_unstable(state);
1516

16-
/**
17-
* @see https://github.com/microsoft/fluentui/blob/master/docs/react-v9/contributing/rfcs/react-components/convergence/custom-styling.md
18-
*
19-
* TODO: 💡 once package will become stable (PR which will be part of promoting PREVIEW package to STABLE),
20-
* - uncomment this line
21-
* - update types {@link file://./../../../../../../../packages/react-components/react-shared-contexts/library/src/CustomStyleHooksContext/CustomStyleHooksContext.ts#CustomStyleHooksContextValue}
22-
* - verify that custom global style override works for your component
23-
*/
24-
// useCustomStyleHook_unstable('useAlphaSliderStyles_unstable')(state);
17+
useCustomStyleHook_unstable('useAlphaSliderStyles_unstable')(state);
2518

2619
return renderAlphaSlider_unstable(state);
2720
});

packages/react-components/react-color-picker/library/src/components/ColorArea/ColorArea.tsx

+2-10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useColorArea_unstable } from './useColorArea';
44
import { renderColorArea_unstable } from './renderColorArea';
55
import { useColorAreaStyles_unstable } from './useColorAreaStyles.styles';
66
import type { ColorAreaProps } from './ColorArea.types';
7+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
78

89
/**
910
* ColorArea component
@@ -12,16 +13,7 @@ export const ColorArea: ForwardRefComponent<ColorAreaProps> = React.forwardRef((
1213
const state = useColorArea_unstable(props, ref);
1314

1415
useColorAreaStyles_unstable(state);
15-
16-
/**
17-
* @see https://github.com/microsoft/fluentui/blob/master/docs/react-v9/contributing/rfcs/react-components/convergence/custom-styling.md
18-
*
19-
* TODO: 💡 once package will become stable (PR which will be part of promoting PREVIEW package to STABLE),
20-
* - uncomment this line
21-
* - update types {@link file://./../../../../../../../packages/react-components/react-shared-contexts/library/src/CustomStyleHooksContext/CustomStyleHooksContext.ts#CustomStyleHooksContextValue}
22-
* - verify that custom global style override works for your component
23-
*/
24-
// useCustomStyleHook_unstable('useColorAreaStyles_unstable')(state);
16+
useCustomStyleHook_unstable('useColorAreaStyles_unstable')(state);
2517

2618
return renderColorArea_unstable(state);
2719
});

packages/react-components/react-color-picker/library/src/components/ColorPicker/ColorPicker.tsx

+2-10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { renderColorPicker_unstable } from './renderColorPicker';
55
import { useColorPickerStyles_unstable } from './useColorPickerStyles.styles';
66
import type { ColorPickerProps } from './ColorPicker.types';
77
import { useColorPickerContextValues } from '../../contexts/colorPicker';
8+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
89

910
/**
1011
* ColorPicker component
@@ -14,16 +15,7 @@ export const ColorPicker: ForwardRefComponent<ColorPickerProps> = React.forwardR
1415
const contextValues = useColorPickerContextValues(state);
1516

1617
useColorPickerStyles_unstable(state);
17-
18-
/**
19-
* @see https://github.com/microsoft/fluentui/blob/master/docs/react-v9/contributing/rfcs/react-components/convergence/custom-styling.md
20-
*
21-
* TODO: 💡 once package will become stable (PR which will be part of promoting PREVIEW package to STABLE),
22-
* - uncomment this line
23-
* - update types {@link file://./../../../../../../../packages/react-components/react-shared-contexts/library/src/CustomStyleHooksContext/CustomStyleHooksContext.ts#CustomStyleHooksContextValue}
24-
* - verify that custom global style override works for your component
25-
*/
26-
// useCustomStyleHook_unstable('useColorPickerStyles_unstable')(state);
18+
useCustomStyleHook_unstable('useColorPickerStyles_unstable')(state);
2719

2820
return renderColorPicker_unstable(state, contextValues);
2921
});

packages/react-components/react-color-picker/library/src/components/ColorSlider/ColorSlider.tsx

+3-11
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,16 @@ import { useColorSlider_unstable } from './useColorSlider';
44
import { renderColorSlider_unstable } from './renderColorSlider';
55
import { useColorSliderStyles_unstable } from './useColorSliderStyles.styles';
66
import type { ColorSliderProps } from './ColorSlider.types';
7+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
78

89
/**
9-
* ColorSlider component - TODO: add more docs
10+
* ColorSlider component
1011
*/
1112
export const ColorSlider: ForwardRefComponent<ColorSliderProps> = React.forwardRef((props, ref) => {
1213
const state = useColorSlider_unstable(props, ref);
1314

1415
useColorSliderStyles_unstable(state);
15-
16-
/**
17-
* @see https://github.com/microsoft/fluentui/blob/master/docs/react-v9/contributing/rfcs/react-components/convergence/custom-styling.md
18-
*
19-
* TODO: 💡 once package will become stable (PR which will be part of promoting PREVIEW package to STABLE),
20-
* - uncomment this line
21-
* - update types {@link file://./../../../../../../../packages/react-components/react-shared-contexts/library/src/CustomStyleHooksContext/CustomStyleHooksContext.ts#CustomStyleHooksContextValue}
22-
* - verify that custom global style override works for your component
23-
*/
24-
// useCustomStyleHook_unstable('useColorSliderStyles_unstable')(state);
16+
useCustomStyleHook_unstable('useColorSliderStyles_unstable')(state);
2517

2618
return renderColorSlider_unstable(state);
2719
});

packages/react-components/react-shared-contexts/library/src/CustomStyleHooksContext/CustomStyleHooksContext.ts

+4
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ export type CustomStyleHooksContextValue = Partial<{
166166
useCarouselNavButtonStyles_unstable: CustomStyleHook;
167167
useCarouselNavContainerStyles_unstable: CustomStyleHook;
168168
useCarouselNavImageButtonStyles_unstable: CustomStyleHook;
169+
useAlphaSliderStyles_unstable: CustomStyleHook;
170+
useColorAreaStyles_unstable: CustomStyleHook;
171+
useColorPickerStyles_unstable: CustomStyleHook;
172+
useColorSliderStyles_unstable: CustomStyleHook;
169173
}>;
170174

171175
/**

0 commit comments

Comments
 (0)