-
Notifications
You must be signed in to change notification settings - Fork 0
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
Demo calculator #20
base: main
Are you sure you want to change the base?
Demo calculator #20
Conversation
roundButton, | ||
style, | ||
]}> | ||
{children as any} |
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.
This will break the app in Mobile, a text needs to be a child of the Text component.
// custom logic | ||
return ( | ||
<RoundButton {...props} style={symbolButton}> | ||
{children as any} |
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.
Same here, a text needs to be a child of the Text component.
import { CustomButtonProps, RoundButton } from '.'; | ||
|
||
const DoubleButton = ({ type = 'default', children, ...props }: CustomButtonProps) => { | ||
const doubleButton = useComponentStyles('DoubleButton'); |
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.
Should pass the style prop as the second argument.
Otherwise, style prop will always get overwritten.
import { InjectedComponentTypes } from '../Theme'; | ||
|
||
const AccentButton = ({ type = 'default', children, ...props }: CustomButtonProps) => { | ||
const accentButton = useComponentStyles('AccentButton'); |
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.
Should pass the style prop as the second argument.
Otherwise, style prop will always get overwritten.
const screen = Dimensions.get('window'); | ||
const buttonWidth = screen.width / 6; | ||
const { Button } = useComponents(); | ||
const roundButton = useComponentStyles('RoundButton'); |
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.
Should pass the style prop as the second argument.
Otherwise, style prop will always get overwritten.
import { CustomButtonProps, RoundButton } from '.'; | ||
|
||
const SymbolButton = ({ type = 'default', children, ...props }: CustomButtonProps) => { | ||
const symbolButton = useComponentStyles('SymbolButton'); |
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.
Should pass the style prop as the second argument.
Otherwise, style prop will always get overwritten.
|
||
export const RoundButton = ({ type = 'default', style, children, ...props }: CustomButtonProps) => { | ||
// set dimmenstion | ||
const screen = Dimensions.get('window'); |
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.
On Web, when the screen size changes, this won't get a new value without refresh.
import { CustomButtonProps } from '.'; | ||
import { InjectedComponentTypes } from '../Theme'; | ||
|
||
const AccentButton = ({ type = 'default', children, ...props }: CustomButtonProps) => { |
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.
unused argument - type
import { useComponents, useComponentStyles } from '@webbee/bamboo-atoms'; | ||
import { CustomButtonProps } from '.'; | ||
|
||
export const RoundButton = ({ type = 'default', style, children, ...props }: CustomButtonProps) => { |
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.
unused argument - type
No description provided.