gabrielbull / react-desktop

React UI Components for macOS High Sierra and Windows 10
http://reactdesktop.js.org
MIT License
9.52k stars 462 forks source link

customize font-size for Windows/Text #116

Closed sosunnyproject closed 6 years ago

sosunnyproject commented 6 years ago

Hello, I cannot find a way to customize font-size of windows Text element.

I imported like below, import { Text } from 'react-desktop/windows'; and wrote my code like this

<div>
<Text horizontalAlignment= 'center' color= 'white' font-size='20px'>Photo</Text>
//few other elements
</div>

I tried fontSize, font-size, size ... but couldn't find a way to edit it. Would you please let me know what's the variable name I can customize font size?

Thanks!

98oktay commented 6 years ago

Hi, try this:

<Text horizontalAlignment= 'center' color= 'white' style={{fontSize:'20px'}}>Photo</Text>

sosunnyproject commented 6 years ago

Yes this works! Thank you!