Skip to content

Commit

Permalink
feat: final radio button group
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinLaubenstein authored and nowseemee committed Jul 27, 2021
1 parent 4161e8b commit 6e978c4
Show file tree
Hide file tree
Showing 3 changed files with 1,331 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
radio-button-group {
/*label*/
--font-weight-label: var(--scl-font-weight-medium);
--font-size-label: 16px;
}

.radio-button-group {
display: inline-flex;
flex-direction: column;
Expand All @@ -6,9 +12,16 @@
.radio-button-group__container {
display: flex;
flex-direction: column;
margin-left: 1.5rem;
}

.radio-button-group__checkbox {
margin-top: 0.5rem;
.radio-button-group__helper-text {
color: red;
font-size: 12px;
margin-top: -0.7rem;
padding-bottom: 0.5rem;
}

.radio-button-group__title {
font-size: var(--font-size-label);
font-weight: 500;
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
import { Component, h, Host } from '@stencil/core';

import { Component, h, Host, Prop } from '@stencil/core';
@Component({
tag: 'scale-radio-button-group',
styleUrl: './radio-button-group.css',
shadow: true,
})
export class CheckboxGroup {
/** (optional) Input label */
@Prop() label: string = '';
/** (optional) Input helper text */
@Prop() helperText?: string = '';
render() {
return (
<Host>
<div class="radio-button-group">
<div class="radio-button-group__label">
<slot name="radio-button-label" />
<h1 class="radio-button-group__title">{this.label}</h1>
{this.helperText && (
<div class="radio-button-group__helper-text">
{this.helperText}
</div>
)}
</div>
<div class="radio-button-group__container">
<slot name="radio-button-list" />
Expand Down
Loading

0 comments on commit 6e978c4

Please sign in to comment.