Skip to content

Commit

Permalink
Allow classes to apply to the span element
Browse files Browse the repository at this point in the history
  • Loading branch information
Studio384 committed Oct 16, 2024
1 parent b98c61c commit 1a8bf73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/src/app/Docs/pages/Changelog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export default function Changelog() {
name="Valkyrie 1.0 alpha 49"
version="1.0.0-alpha.49"
date="17 October 2024"
added={[
<>
You can now apply <Code>className</Code> to the <Code>ValkyrieIcon</Code> component.
</>
]}
newIcons={['apple', 'moped', 'plate-utensils', 'receipt', 'shopping-cart', 'wallet', 'windows']}
renamedIcons={[
{ old: 'thumbstack', new: 'thumbtack' },
Expand Down
8 changes: 4 additions & 4 deletions src/ValkyrieIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export default function ValkyrieIcon({
transform: ${flip === "x"
? "scaleX(-1)"
: flip === "y"
? "scaleY(-1)"
: "scale(-1)"};
? "scaleY(-1)"
: "scale(-1)"};
`;

const spinClass = css`
Expand Down Expand Up @@ -105,14 +105,14 @@ export default function ValkyrieIcon({

return (
<span
className={cx({
className={cx(className, {
[viClass]: true,
[rotateClass]: rotate !== null && rotate !== undefined,
[flipClass]: !!flip,
[spinClass]: !!spin,
[spinPulseClass]: spin === "pulse",
[beatClass]: beat,
[fadeClass]: fade
[fadeClass]: fade,
})}
{...props}
>
Expand Down

0 comments on commit 1a8bf73

Please sign in to comment.