toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Card component with no hover state

Open aaronthomas opened this issue 7 years ago • 5 comments

Expected Behaviour

We need to be able to use the Card component without the default hover state. A modifier class to disable those styles needs to be implemented.

Current Behaviour

When you hover/focus on a card, the component moves and the shadow changes. In a later major release of Toolkit this will be opt-in behaviour, but for now it will remain the default for backwards compatibility.

Context

Two upcoming projects in Trading require cards that are non-interactive with no hover or focus states.

aaronthomas avatar Jan 12 '18 14:01 aaronthomas

Agreed, I think a sensible approach would be to:

  1. Release a --no-hover modifier as a feature.
  2. Follow up with a __link component to provide that behaviour as a breaking change in 3.0.

joe-bell avatar Jan 12 '18 14:01 joe-bell

Yep thats the plan.

Do you think --no-hover is suitable? What about --static or --unlinked?

aaronthomas avatar Jan 12 '18 14:01 aaronthomas

I like --static personally.

MrDinsdale avatar Jan 12 '18 14:01 MrDinsdale

Yup, I'm sold on --static - go for it

joe-bell avatar Jan 12 '18 14:01 joe-bell

Re-opening this to resolve in 3.0

joe-bell avatar Feb 05 '18 10:02 joe-bell