feat(tl-ref): bold names of required parameters

This commit is contained in:
teidesu 2021-04-14 22:10:43 +03:00
parent c318c059f8
commit 73312e2809

View file

@ -75,6 +75,9 @@ const useStyles = makeStyles((theme) =>
string: { string: {
color: '#98c379', color: '#98c379',
}, },
bold: {
fontWeight: 'bold',
},
}) })
) )
@ -152,7 +155,9 @@ export default function TlObject({ data }: { data: GraphqlResult }) {
name="description" name="description"
content={ content={
obj.description || obj.description ||
obj.prefix + obj.name + " currently doesn't have a description." obj.prefix +
obj.name +
" currently doesn't have a description."
} }
/> />
</Helmet> </Helmet>
@ -237,7 +242,16 @@ export default function TlObject({ data }: { data: GraphqlResult }) {
{obj.arguments.map((arg) => ( {obj.arguments.map((arg) => (
<TableRow key={arg.name}> <TableRow key={arg.name}>
<TableCell> <TableCell>
<code>{arg.name}</code> <code
className={
!arg.optional &&
arg.type !== '$FlagsBitField'
? classes.bold
: undefined
}
>
{arg.name}
</code>
</TableCell> </TableCell>
<TableCell className={classes.mono}> <TableCell className={classes.mono}>
{LinkToTl(arg.type)} {LinkToTl(arg.type)}