From 9c9f8b2f0e9f0e810cb6fcd51cdc27d03bc2499f Mon Sep 17 00:00:00 2001 From: Tatiana Cherednichenko Date: Thu, 1 Jul 2021 11:54:47 +0300 Subject: [PATCH 1/3] fix: rewrite data-selector, fix grammar --- src/woly/atoms/button-icon/index.tsx | 4 +- src/woly/atoms/button/index.tsx | 10 ++--- src/woly/atoms/button/usage.mdx | 4 +- src/woly/atoms/chip/usage.mdx | 2 +- src/woly/atoms/input/usage.mdx | 4 +- src/woly/atoms/label/usage.mdx | 2 +- src/woly/atoms/text/usage.mdx | 2 +- src/woly/elements/input-container/index.tsx | 10 ++--- src/woly/molecules/checkbox/index.tsx | 49 +++++++++++---------- src/woly/molecules/checkbox/usage.mdx | 2 +- src/woly/molecules/field/index.tsx | 4 +- src/woly/molecules/field/usage.mdx | 4 +- src/woly/molecules/input-password/usage.mdx | 4 +- src/woly/molecules/radio-button/usage.mdx | 4 +- src/woly/molecules/select/usage.mdx | 4 +- src/woly/molecules/switch/usage.mdx | 2 +- 16 files changed, 57 insertions(+), 54 deletions(-) diff --git a/src/woly/atoms/button-icon/index.tsx b/src/woly/atoms/button-icon/index.tsx index 9104a0b9..a98890b4 100644 --- a/src/woly/atoms/button-icon/index.tsx +++ b/src/woly/atoms/button-icon/index.tsx @@ -25,7 +25,7 @@ const ButtonIconBase: React.FC = ({ type="button" {...p} > - {icon} + {icon} ); @@ -46,7 +46,7 @@ export const ButtonIcon = styled(ButtonIconBase)` border-radius: var(--woly-rounding); outline: none; - [data-icon] { + [data-icon='button-icon'] { display: flex; align-items: center; justify-content: center; diff --git a/src/woly/atoms/button/index.tsx b/src/woly/atoms/button/index.tsx index f9180ffc..0b5f630b 100644 --- a/src/woly/atoms/button/index.tsx +++ b/src/woly/atoms/button/index.tsx @@ -4,7 +4,7 @@ import styled, { StyledComponent } from 'styled-components'; import { Priority } from 'lib/types'; import { box } from 'ui/elements/box'; -export type Buttonprioritys = +export type ButtonPriorities = | 'secondary' | 'primary' | 'default' @@ -34,12 +34,12 @@ const ButtonBase: React.FC = ({ }) => ( ); @@ -76,11 +76,11 @@ export const Button = styled(ButtonBase)` } } - &[data-width='true'] { + &[data-full-width='true'] { width: 100%; } - [data-icon] { + [data-icon='button'] { --local-icon-size: var(--woly-line-height); display: flex; align-items: center; diff --git a/src/woly/atoms/button/usage.mdx b/src/woly/atoms/button/usage.mdx index 78b50d64..d95aeeb1 100644 --- a/src/woly/atoms/button/usage.mdx +++ b/src/woly/atoms/button/usage.mdx @@ -43,9 +43,9 @@ Button can span the entire width of the container or have a fixed width /> -### prioritys +### priorities -Primary and danger prioritys are should be used to focus user attention. +Primary and danger priorities are should be used to focus user attention.