mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
parent
fd3698b49a
commit
85c4a14b2a
25 changed files with 546 additions and 28 deletions
|
@ -23,13 +23,10 @@
|
|||
|
||||
let buttonRef = undefined;
|
||||
|
||||
$: {
|
||||
if (ctx && buttonRef) {
|
||||
ctx.declareRef({ name: 'buttonRef', ref: buttonRef });
|
||||
}
|
||||
$: if (ctx && buttonRef) {
|
||||
ctx.declareRef({ name: 'buttonRef', ref: buttonRef });
|
||||
}
|
||||
|
||||
const _class = cx(
|
||||
$: _class = cx(
|
||||
'--btn',
|
||||
size === 'field' && '--btn--field',
|
||||
(size === 'small' || small) && '--btn--sm',
|
||||
|
@ -47,7 +44,7 @@
|
|||
hasIconOnly && tooltipAlignment && `--tooltip--align-${tooltipAlignment}`,
|
||||
className
|
||||
);
|
||||
const buttonProps = {
|
||||
$: buttonProps = {
|
||||
role: 'button',
|
||||
type: href && !disabled ? undefined : type,
|
||||
tabindex,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue