-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
manuel.carrera
committed
Dec 6, 2024
1 parent
a643134
commit afe1516
Showing
4 changed files
with
33 additions
and
1 deletion.
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
21 changes: 21 additions & 0 deletions
21
modules/react/icon/stories/examples/Image/FromFileSystem.tsx
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,21 @@ | ||
import React from 'react'; | ||
import {Flex} from '@workday/canvas-kit-react/layout'; | ||
import {Image} from '@workday/canvas-kit-react/icon'; | ||
import {createStyles} from '@workday/canvas-kit-styling'; | ||
|
||
// @ts-ignore: Cannot find module error | ||
import catImage from '../images/cat.jpg'; | ||
|
||
const styleOverrides = { | ||
parentContainer: createStyles({ | ||
maxHeight: 300, | ||
}), | ||
}; | ||
|
||
export const FromFileSystem = () => { | ||
return ( | ||
<Flex cs={styleOverrides.parentContainer}> | ||
<Image src={catImage} cs={{objectFit: 'cover', height: 200}} alt="Image of a cat mid yawn" /> | ||
</Flex> | ||
); | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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