-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #484 from WestpacGEL/fixes/image-captions
fixes/image caption styling
- Loading branch information
Showing
12 changed files
with
37 additions
and
6 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
6 changes: 6 additions & 0 deletions
6
...site/src/components/component-blocks/components/image-caption/image-caption.component.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,6 @@ | ||
import { styles } from './image-caption.style'; | ||
import { type ImageCaptionProps } from './image-caption.types'; | ||
|
||
export const ImageCaption = ({ text }: ImageCaptionProps) => { | ||
return <p className={styles({})}>{text}</p>; | ||
}; |
11 changes: 11 additions & 0 deletions
11
apps/site/src/components/component-blocks/components/image-caption/image-caption.preview.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,11 @@ | ||
import { component, fields } from '@keystatic/core'; | ||
|
||
export const imageCaption = component({ | ||
label: 'Image Caption', | ||
preview: props => <>{props.fields.text.value || ''}</>, | ||
schema: { | ||
text: fields.text({ | ||
label: 'Image Caption', | ||
}), | ||
}, | ||
}); |
5 changes: 5 additions & 0 deletions
5
apps/site/src/components/component-blocks/components/image-caption/image-caption.style.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,5 @@ | ||
import { tv } from 'tailwind-variants'; | ||
|
||
export const styles = tv({ | ||
base: 'typography-body-10 mb-5 mt-2 text-muted', | ||
}); |
3 changes: 3 additions & 0 deletions
3
apps/site/src/components/component-blocks/components/image-caption/image-caption.types.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,3 @@ | ||
export type ImageCaptionProps = { | ||
text?: string; | ||
}; |
2 changes: 2 additions & 0 deletions
2
apps/site/src/components/component-blocks/components/image-caption/index.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,2 @@ | ||
export * from './image-caption.component'; | ||
export * from './image-caption.types'; |
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
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
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
6e81892
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gel-next-site – ./apps/site
gel-next-site.vercel.app
gel-next-site-westpacgel.vercel.app
gel-next-site-git-main-westpacgel.vercel.app