Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Demo calculator #20

wants to merge 3 commits into from

Conversation

femitj
Copy link

@femitj femitj commented Oct 21, 2022

No description provided.

roundButton,
style,
]}>
{children as any}
Copy link
Contributor

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}
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

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) => {
Copy link
Contributor

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) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused argument - type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants