-
Notifications
You must be signed in to change notification settings - Fork 4
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
Imple heading component #15
Conversation
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
src/utils/style.spec.ts
Outdated
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.
Builds fall apart when there is no test.
@@ -1,13 +1,9 @@ | |||
export type Opacity = 'normal' | 'darker'; | |||
export const opacityToClassName = (opacity: Opacity) => { |
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.
If the return value is not narrowed down, a type error will occur.
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.
I think this component looks good.
It may need to be adapted for another design in the future.
@8845musign
And please remove typed-css-modules. 🙏
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
Additonal style, i understood!
DONE! |
@@ -34,7 +34,7 @@ export const RadioButton: FC<Props> = ({ | |||
...otherProps | |||
}) => { | |||
return ( | |||
<div className={clsx(styles.container, styles[size])}> | |||
<div className={clsx(styles[size])}> |
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.
.container
was gone.
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
leadingBorder?: boolean; | ||
/** | ||
* レンダリングされるHTML要素 | ||
* @default p |
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.
Added 4/19
I have dared to use the p element as the default.
I think it would be less problematic if it were a p element rather than specifying the wrong heading element.
*/ | ||
id?: string; | ||
/** | ||
* HTMLのfor属性。label要素の場合に使用 |
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.
Added 4/19
I checked the product and found a comment asking for a label with the look and feel of a heading.
Signed-off-by: 8845musign <hiroki.yokouchi@dr-ubie.com>
* レンダリングされるHTML要素 | ||
* @default p | ||
*/ | ||
as: HTMLTagname; |
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.
Added 4/19
Element constraints removed
Reopened. Additional areas for review are noted in the comments. |
Overview
specification
Size
size
propsVariant
variant
propsecondary
primary
accent
white
white
is used for dark backgroundsLeading Border
leadingBorder
propvariant
will besecondary
Text Align
textAlign
propIcon
icon
prop for each color variationrendering element
as
propothers
addtyped-css-modules
Type-safe CSSError if class does not existReads CSS and generates definition files