-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(button): add bal-button-group component
- Loading branch information
Showing
5 changed files
with
58 additions
and
25 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
packages/components/src/components/bal-button/bal-button-group/bal-button-group.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component, h, Prop, Host, ComponentInterface } from '@stencil/core' | ||
|
||
@Component({ | ||
tag: 'bal-button-group', | ||
}) | ||
export class ButtonGroup implements ComponentInterface { | ||
/** | ||
* The value of the button, which is submitted with the form data. | ||
*/ | ||
@Prop() position: 'right' | 'center' | '' = '' | ||
|
||
render() { | ||
return ( | ||
<Host | ||
class={{ | ||
'field': true, | ||
'is-grouped': true, | ||
'is-grouped-right': this.position === 'right', | ||
'is-grouped-centered': this.position === 'center', | ||
}} | ||
> | ||
<slot /> | ||
</Host> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters