Add style guide examples for ContactName and ConversationTitle
This commit is contained in:
parent
2988da0981
commit
9dedda84e2
3 changed files with 78 additions and 1 deletions
32
ts/components/conversation/ContactName.md
Normal file
32
ts/components/conversation/ContactName.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#### With name and profile
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<div style={{ backgroundColor: 'gray', color: 'white' }}>
|
||||||
|
<ContactName
|
||||||
|
i18n={util.i18n}
|
||||||
|
name="Someone 🔥 Somewhere"
|
||||||
|
phoneNumber="+12025550011"
|
||||||
|
profileName="🔥Flames🔥"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Profile, no name
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<div style={{ backgroundColor: 'gray', color: 'white' }}>
|
||||||
|
<ContactName
|
||||||
|
i18n={util.i18n}
|
||||||
|
phoneNumber="+12025550011"
|
||||||
|
profileName="🔥Flames🔥"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### No name, no profile
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<div style={{ backgroundColor: 'gray', color: 'white' }}>
|
||||||
|
<ContactName i18n={util.i18n} phoneNumber="+12025550011" />
|
||||||
|
</div>
|
||||||
|
```
|
45
ts/components/conversation/ConversationTitle.md
Normal file
45
ts/components/conversation/ConversationTitle.md
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
#### With name and profile, verified
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<div style={{ backgroundColor: 'gray', color: 'white' }}>
|
||||||
|
<ConversationTitle
|
||||||
|
i18n={util.i18n}
|
||||||
|
isVerified
|
||||||
|
name="Someone 🔥 Somewhere"
|
||||||
|
phoneNumber="+12025550011"
|
||||||
|
profileName="🔥Flames🔥"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### With name, not verified
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<div style={{ backgroundColor: 'gray', color: 'white' }}>
|
||||||
|
<ConversationTitle
|
||||||
|
i18n={util.i18n}
|
||||||
|
name="Someone 🔥 Somewhere"
|
||||||
|
phoneNumber="+12025550011"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Profile, no name
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<div style={{ backgroundColor: 'gray', color: 'white' }}>
|
||||||
|
<ConversationTitle
|
||||||
|
i18n={util.i18n}
|
||||||
|
phoneNumber="+12025550011"
|
||||||
|
profileName="🔥Flames🔥"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### No name, no profile
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<div style={{ backgroundColor: 'gray', color: 'white' }}>
|
||||||
|
<ConversationTitle i18n={util.i18n} phoneNumber="+12025550011" />
|
||||||
|
</div>
|
||||||
|
```
|
|
@ -25,7 +25,7 @@ export class ConversationTitle extends React.Component<Props> {
|
||||||
{phoneNumber ? (
|
{phoneNumber ? (
|
||||||
<span className="conversation-number">{phoneNumber}</span>
|
<span className="conversation-number">{phoneNumber}</span>
|
||||||
) : null}{' '}
|
) : null}{' '}
|
||||||
{profileName ? (
|
{profileName && !name ? (
|
||||||
<span className="profileName">
|
<span className="profileName">
|
||||||
<Emojify text={profileName} i18n={i18n} />
|
<Emojify text={profileName} i18n={i18n} />
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue