diff --git a/packages/table-react/src/ExpandableTableRow.tsx b/packages/table-react/src/ExpandableTableRow.tsx index ac662bd84a8..3e4da868028 100644 --- a/packages/table-react/src/ExpandableTableRow.tsx +++ b/packages/table-react/src/ExpandableTableRow.tsx @@ -39,7 +39,7 @@ const ExpandableTableRow = forwardRef(isOpen); + const [animationRef] = useAnimatedHeight(isOpen, { timing: "expressive" }); const toggleOpen = () => { const newIsOpen = !isOpen; diff --git a/packages/table/_table-cell.scss b/packages/table/_table-cell.scss index 33352c29b33..ddba638a27f 100644 --- a/packages/table/_table-cell.scss +++ b/packages/table/_table-cell.scss @@ -1,11 +1,5 @@ @use "@fremtind/jkl-core/jkl"; -@mixin _expanded-arrow($px) { - .jkl-expand-button__arrow { - transform: translateY(jkl.rem($px)); - } -} - @include jkl.comfortable-density-variables { @include jkl.declare-font-variables("jkl-table-cell", "body"); @@ -83,12 +77,7 @@ &:hover, html:not([data-mousenavigation]):not([data-touchnavigation]) &:focus { .jkl-table-row-expand-button { - @include _expanded-arrow(3px); color: var(--expand-button-focus-color); - - &--expanded { - @include _expanded-arrow(0); - } } } }