Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(components): fixes for button, icon toggle, card
- Loading branch information
github-actions
committed
Nov 10, 2022
1 parent
af2a329
commit fd10507
Showing
7 changed files
with
50,694 additions
and
81 deletions.
There are no files selected for viewing
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
33 changes: 33 additions & 0 deletions
33
libs/components/src/icon-button-toggle/icon-button-toggle.stories.js
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,33 @@ | ||
import './icon-button-toggle'; | ||
import iconList from '../../../icons/material-codepoints.json'; | ||
|
||
export default { | ||
title: 'Components/Icon Button Toggle', | ||
argTypes: { | ||
onIcon: { | ||
control: 'select', | ||
options: Object.keys(iconList), | ||
defaultValue: 'alarm_on', | ||
}, | ||
offIcon: { | ||
control: 'select', | ||
options: Object.keys(iconList), | ||
defaultValue: 'alarm_off', | ||
}, | ||
disabled: { | ||
control: 'boolean', | ||
defaultValue: false, | ||
}, | ||
onClick: { action: 'onClick' }, | ||
}, | ||
}; | ||
|
||
const Template = ({ onIcon, offIcon, onClick }) => { | ||
return ` | ||
<td-icon-button-toggle | ||
onIcon="${onIcon}" | ||
offIcon="${offIcon}"> | ||
</td-icon-button-toggle>`; | ||
}; | ||
|
||
export const Basic = Template.bind({}); |
14 changes: 14 additions & 0 deletions
14
libs/components/src/icon-button-toggle/icon-button-toggle.ts
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,14 @@ | ||
import { IconButtonToggleBase } from '@material/mwc-icon-button-toggle/mwc-icon-button-toggle-base'; | ||
import { styles } from '@material/mwc-icon-button/mwc-icon-button.css'; | ||
import { customElement } from 'lit/decorators.js'; | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'td-icon-button-toggle': CovalentIconButtonToggleBase; | ||
} | ||
} | ||
|
||
@customElement('td-icon-button-toggle') | ||
export class CovalentIconButtonToggleBase extends IconButtonToggleBase { | ||
static override styles = [styles]; | ||
} |
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
Oops, something went wrong.