Skip to content

Commit

Permalink
Fix top/bottom padding of box content (#40)
Browse files Browse the repository at this point in the history
* Fix top/bottom padding of box content

* Fix box test
  • Loading branch information
gustavorosolem authored Aug 18, 2021
1 parent e722343 commit 5dc03cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions styleguide/src/Layout/Box/Box.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ describe('Box tests', () => {
cy.get('.box-header .indicator-status').contains('Some status')
cy.get('.box-header .tabs button').should('have.length', 3)
cy.get('.box-content').contains('Box Content')
cy.get('.box-content').should('have.class', 'lg:px-10')
cy.get('.box-content').should('have.class', 'lg:p-10')
})
})

it('Small', () => {
mount(<Default variant="small" />)
cy.get('.box .box-content').should('not.have.class', 'lg:px-10')
cy.get('.box .box-content').should('not.have.class', 'lg:p-10')
})

it('WithAction', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React, { useContext } from 'react'
import { SharedContext } from '../utils'

const listOfMarginVariants = {
default: `my-5 -mx-6 lg:my-8 lg:-mx-10`,
small: `my-5 -mx-6`,
default: `my-6 -mx-6 lg:my-10 lg:-mx-10`,
small: `my-6 -mx-6`,
}

export const BoxSeparator = () => {
Expand Down
4 changes: 2 additions & 2 deletions styleguide/src/Layout/Box/Components/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export const defaultPaddingVariantsHeader = {
}

export const defaultPaddingVariantsContent = {
default: `px-6 py-5 lg:px-10 lg:py-8`,
small: `px-6 py-5`,
default: `p-6 lg:p-10`,
small: `p-6`,
}

0 comments on commit 5dc03cc

Please sign in to comment.