Skip to content

Commit 667f7ec

Browse files
committed
Improve documentation for custom notification icons and online image usage
1 parent 5679a41 commit 667f7ec

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

docs/website/src/pages/ComponentsPage.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,25 @@ export default function ComponentsPage({ version }: { version: Iversion }) {
9494
{/* {data?.how_to_add_both_imgs} */}
9595
{/* <p className="paragraph">For Both Images pass in <span className="code">NotificationStyles.BOTH_IMGS</span> as argument to <span className="code">style</span> and provide both paths</p> */}
9696
<h3 className='app-icon-h3 sub-header'>Changing Default Notification Icon</h3>
97-
{isLegacyVersion(version)?
97+
{isLegacyVersion(version) ?
9898
<p className='paragraph'>When you initialize Notification instance you can pass in file path to <span className="code">app_icon</span> </p>
99-
:<p className='paragraph'>Use <span className="code">.setSmallIcon(path)</span> to set custom notification icon</p>
99+
: <p className='paragraph'>Use <span className="code">.setSmallIcon(path)</span> to set custom notification icon</p>
100100
}
101101
<p className='paragraph'>Must use <span className="code yellow"> PNG format</span> Or Image Will display as a Black Box.</p>
102102
<CodeBlock title='Custom Icon' img={customIconImg} code={data?.small_icon_code || ''} />
103103
{
104-
isLegacyVersion(version)?
105-
<></>
106-
:
107-
<CodeBlock code={`Notification(
104+
isLegacyVersion(version) ?
105+
<CodeBlock code={`Notification(
106+
title="Using Online Image",
107+
message="Pass image URL as path to setBigImage",
108+
style=NotificationStyles.BIG_PICTURE,
109+
big_picture_path="https://www.python.org/static/img/python-logo.png")`} title='Online Image' img={onlineBigPicImg} />
110+
111+
:
112+
<CodeBlock code={`Notification(
108113
title="Using Online Image",
109114
message="Pass image URL as path to setBigImage"
110-
).setBigPicture("https://www.python.org/static/img/python-logo.png")`} title='Online Image' img={onlineBigPicImg}/>
115+
).setBigPicture("https://www.python.org/static/img/python-logo.png")`} title='Online Image' img={onlineBigPicImg} />
111116

112117
}
113118
<p className='paragraph inner-section-1'>For about Images see <Link to='/advanced-methods#updating-notification'>advanced methods</Link> section</p>

0 commit comments

Comments
 (0)