Skip to content

Commit

Permalink
fix: change the way we define the default variant on #button component
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Feb 2, 2019
1 parent 47d8f0f commit 807be49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { hamburger as hamburgerIcon } from 'dnb-ui-lib/src/icons/secondary_icons
import { close as closeIcon } from 'dnb-ui-lib/src/icons/primary_icons'
import PortalLogo from './graphics/logo'
import { Icon, Button } from 'dnb-ui-lib/src'
import { MainMenuToggleButton } from './ToggleMainMenu'
import { SidebarMenuConsumer } from './SidebarMenuContext'
import ToggleGrid from './ToggleGrid'
import { MainMenuToggleButton } from './ToggleMainMenu'

const Bar = styled.div`
position: fixed;
Expand Down
4 changes: 2 additions & 2 deletions packages/dnb-ui-lib/src/components/button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const propTypes = {
export const defaultProps = {
type: 'button',
text: null,
variant: 'primary',
variant: null,
size: null,
title: null,
icon: null,
Expand Down Expand Up @@ -174,7 +174,7 @@ export default class Button extends PureComponent {

const classes = classnames(
'dnb-button',
usedVariant && `dnb-button--${usedVariant}`,
`dnb-button--${usedVariant || 'primary'}`,
usedSize && usedSize !== 'default'
? `dnb-button--size-${usedSize}`
: null,
Expand Down

0 comments on commit 807be49

Please sign in to comment.