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

feat(component): add button component #47

Merged
merged 4 commits into from
Jul 5, 2022

Conversation

niloysikdar
Copy link
Member

@niloysikdar niloysikdar commented Jun 30, 2022

This Pull Request covers:

  • New component Button
  • Stories for newly added component
  • Use a tag under the hood
  • Props for the component
export interface BaseStyleProp<T extends string> {
  classes?: Partial<Record<T, CSSProperties>>;
  className?: string;
}

type ButtonStyles = 'root' | 'primary' | 'secondary';

export interface ButtonProps extends BaseStyleProp<ButtonStyles> {
  children?: ReactNode;
  variant?: 'primary' | 'secondary';
  href: string;
  target?: HTMLAttributeAnchorTarget;
}

Resolves #40

Signed-off-by: Niloy Sikdar niloysikdar30@gmail.com

@niloysikdar niloysikdar added the GSoC 2022 Issues and Pull Requests under Google Summer of Code 2022 label Jun 30, 2022
@niloysikdar niloysikdar marked this pull request as ready for review July 4, 2022 05:33
add button component

resolves #40

Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
add new stories for button component

resolves #40

Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
@niloysikdar niloysikdar force-pushed the feat/40-add-component-button branch 2 times, most recently from 6b24d6c to af05f67 Compare July 4, 2022 07:53
src/components/Button/Button.tsx Outdated Show resolved Hide resolved
src/components/Button/Button.tsx Outdated Show resolved Hide resolved
src/components/Button/Button.tsx Outdated Show resolved Hide resolved
fix Button component types to extend from BaseStyles and add classes to the props list
fix BaseStyles to convert Record as Partial to make things optional

resolves #40

Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
@niloysikdar niloysikdar force-pushed the feat/40-add-component-button branch from af05f67 to f0880bd Compare July 4, 2022 16:38
add new stories for Button components with Primary and Secondary variants

resolves #40

Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
@niloysikdar niloysikdar force-pushed the feat/40-add-component-button branch from ccb9735 to 309e612 Compare July 5, 2022 08:13
@agentmilindu agentmilindu merged commit c846451 into main Jul 5, 2022
@agentmilindu agentmilindu deleted the feat/40-add-component-button branch July 5, 2022 09:37
github-actions bot pushed a commit that referenced this pull request Jul 5, 2022
# [1.1.0](v1.0.1...v1.1.0) (2022-07-05)

### Features

* **component:** add button component ([#47](#47)) ([c846451](c846451)), closes [#40](#40) [#40](#40) [#40](#40) [#40](#40)
* **component:** add column and section ([#46](#46)) ([c89ad5e](c89ad5e)), closes [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39) [#39](#39)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC 2022 Issues and Pull Requests under Google Summer of Code 2022
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add component: Button
2 participants