ActionSheet does not follow theme colors from the designTokens
TolgaYigit opened this issue · comments
Description
The ActionSheet component does not follow theme colors from the designTokens.
Related to
- Components
- Demo
- Docs
- Typings
Steps to reproduce
- Use the ActionSheet component in a project.
- Apply theme colors from designTokens.
- Open the ActionSheet.
Expected behavior
I expected the ActionSheet to follow the theme colors specified in designTokens.
Actual behavior
The ActionSheet does not adopt the theme colors from designTokens, and instead, it displays using static color modifiers.
More Info
In the given code snippets, both the styles of the action sheet and the renderAction
function contain static color modifiers. They should be modified to utilize colors from the designTokens
.
Code snippet
export const MyComponent = () => {
const [showActionSheet, setShowActionSheet] = useState(false);
return (
<ActionSheet
useSafeArea
migrateDialog
options={[
{
label: 'Refresh',
onPress: () => {
console.log('Refresh');
},
},
]}
visible={showActionSheet}
onDismiss={() => setShowActionSheet(false)}
/>
);
};
Here is the style of the action sheet:
react-native-ui-lib/src/components/actionSheet/index.tsx
Lines 288 to 306 in 6089796
renderAction function:
react-native-ui-lib/src/components/actionSheet/index.tsx
Lines 165 to 183 in 6089796
Screenshots/Video
Environment
- React Native version: 0.72.6
- React Native UI Lib version: 7.14.5
Affected platforms
- Android
- iOS
- Web
Here is the pull request for the fix: #2952