ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Update button interaction state behaviour

Open DBD324 opened this issue 1 year ago โ€ข 1 comments

Summary

Buttons apply the interaction state colour variants of the action colour to the background, borders and foreground. This should be simplified as detailed below.

๐Ÿ’ฌ Description

Buttons should use the following tokens in each of their interaction states:

Primary button

State Fill Border Foreground
Default --ic-action-default None --ic-color-primary-text or --ic-color-white-text
Hover --ic-action-default-hover None --ic-color-primary-text or --ic-color-white-text
Active --ic-action-default-active None --ic-color-primary-text or --ic-color-white-text

Secondary button

State Fill Border Foreground
Default None --ic-action-default --ic-action-contrast-text
Hover --ic-action-default-bg-hover --ic-action-default-hover --ic-action-contrast-text
Active --ic-action-default-bg-active --ic-action-default-active --ic-action-contrast-text

Tertiary button

State Fill Border Foreground
Default None None --ic-action-contrast-text
Hover --ic-action-default-bg-hover None --ic-action-contrast-text
Active --ic-action-default-bg-active None --ic-action-contrast-text

Need to apply these changes to the dark and light variants of buttons as well. Need to apply these changes to the dropdown buttons as well.

๐Ÿ’ฐ Use value

These changes will make it easier to theme button component with custom action colour. It will ensure good colour contrast between foreground and background.

๐Ÿ“ Acceptance Criteria

If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.

Given that a button exists When interacting with it Then the relevant interaction states should be displayed and observe the changes listed above.

โœ Designs

If there's a Figma design file (or other mock-up), include it here.

##โ€ฏ๐Ÿงพ Guidance If there's written guidance or documentation, include a link to it here.

Additional info

Tell us anything else useful to help us understand your suggestion.

DBD324 avatar Mar 13 '24 16:03 DBD324

Good candidate as prep work for dark mode

GCHQ-Developer-094 avatar May 14 '24 15:05 GCHQ-Developer-094