Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

feat: add button component#354

Open
quatrolavita wants to merge 2 commits intomasterfrom
feat/add_button
Open

feat: add button component#354
quatrolavita wants to merge 2 commits intomasterfrom
feat/add_button

Conversation

@quatrolavita
Copy link
Collaborator

No description provided.

@commit-lint
Copy link

commit-lint bot commented Sep 26, 2022

Features

Contributors

sashalavrus

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@github-actions github-actions bot temporarily deployed to deploy-preview September 26, 2022 18:59 Inactive
import classNames from 'classnames'

import styles from './Button.module.css'
// constants
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// constants

import { createButtonDriver, DriverType } from './Button.driver'
import styles from './Button.module.css'

describe('Button', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
describe('Button', () => {
describe('<Button />', () => {

@@ -0,0 +1 @@
export {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

need delete

driver = createButtonDriver()
})

describe('default button behavior', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

можна простіше

Suggested change
describe('default button behavior', () => {
describe('by default', () => {

})
})

describe('layout button behavior', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
describe('layout button behavior', () => {
describe('by default', () => {

Comment on lines +95 to +96
clickButton: () =>
fireEvent.click(screen.getByTestId(ButtonDataHooks.Button)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

це треба перенести в when

expect(buttonPrimary).toHaveClass(styles.outline)
})

it('with custom ccolor', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
it('with custom ccolor', () => {
it('with custom color', () => {

expect(button).toHaveAttribute('disabled')
})

it('should be disabled when loading, ', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
it('should be disabled when loading, ', () => {
it('should be disabled when loading', () => {

children: <span>Title</span>,
}

export const CustomColot = Template.bind({})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
export const CustomColot = Template.bind({})
export const CustomColor = Template.bind({})

import classNames from 'classnames'

import styles from './Button.module.css'
// constants
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// constants

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants