@@ -2,7 +2,7 @@ import { useTranslation } from "@dzangolab/react-i18n";
22import { Button , Message , Page } from "@dzangolab/react-ui" ;
33import { useNavigate } from "react-router-dom" ;
44
5- import { Section } from "../../../components/Demo" ;
5+ import { CodeBlock , Section } from "../../../components/Demo" ;
66
77export const MessageDemo = ( ) => {
88 const [ t ] = useTranslation ( "ui" ) ;
@@ -23,20 +23,33 @@ export const MessageDemo = () => {
2323 >
2424 < Section title = { t ( "message.usage.basic" ) } >
2525 < Message message = { t ( "message.contents.content1" ) } />
26+ < CodeBlock exampleCode = '<Message message="Season sale: Up to 50% off selected items!" />' />
2627 </ Section >
2728
2829 < Section title = { t ( "message.usage.icons.icon" ) } >
2930 < Message
3031 message = { t ( "message.contents.content2" ) }
3132 icon = "pi pi-android"
3233 />
34+ < CodeBlock
35+ exampleCode = '<Message
36+ message="New features just launched! Check them out!"
37+ icon="pi pi-android"
38+ />'
39+ />
3340 </ Section >
3441
3542 < Section title = { t ( "message.usage.icons.iconSlot" ) } >
3643 < Message
3744 message = { t ( "message.contents.content3" ) }
3845 icon = { < i className = "pi pi-bell" /> }
3946 />
47+ < CodeBlock
48+ exampleCode = '<Message
49+ message="New Year, New You: Start fresh with our services!"
50+ icon={<i className="pi pi-bell" />}
51+ />'
52+ />
4053 </ Section >
4154
4255 < Section title = { t ( "message.usage.enableClose" ) } >
@@ -45,6 +58,13 @@ export const MessageDemo = () => {
4558 icon = { < i className = "pi pi-bell" /> }
4659 message = { t ( "message.contents.content4" ) }
4760 />
61+ < CodeBlock
62+ exampleCode = '<Message
63+ message="We value your feedback: take our quick survey!"
64+ icon={<i className="pi pi-bell" />}
65+ enableClose={true}
66+ />'
67+ />
4868 </ Section >
4969 </ Page >
5070 ) ;
0 commit comments