-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs/ppdsc 2514 checkbox component scenario #711
Docs/ppdsc 2514 checkbox component scenario #711
Conversation
You can preview these changes on: |
@@ -1,20 +1,62 @@ | |||
import React from 'react'; | |||
import {Story as StoryType} from '@storybook/react'; | |||
import styled from '@emotion/styled'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't import this from emotion, use newskit instead.
const customCheckbox = { | ||
'checked:hover': customStyle, | ||
'checked:focus': customStyle, | ||
'checked:focus:hover': customStyle, | ||
checked: customStyle, | ||
'focus-visible': defaultFocusVisible, | ||
focus: {}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add a base state here, something like this, I am not sure about the correct colours, you can check with the design team.
base: {
backgroundColor: '{{colors.interfaceInformative020}}',
borderColor: '{{colors.interfaceInformative030}}',
borderWidth: '{{borders.borderWidth020}}',
borderRadius: '{{borders.borderRadiusRounded010}}',
borderStyle: 'solid',
iconColor: '{{colors.inkInverse}}',
},
after you have all colours you might need to update them in all states ( check the available states in src/checkbox/style-presets.ts
}, | ||
label: { | ||
typographyPreset: 'utilityBody020', | ||
stylePreset: 'labelCustom', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you can use stylePreset: 'inkBrand010',
it's gonna have same result, no need for custom style-preset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mutebg
#766
What
I have done:
I have tested manually:
Before:
After:
Who should review this PR:
How to test: