mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
* Proof of concept fonts * Inheirit font style * Use style prop * More font attributes * Reset demo * Fixes * Font example * Text transforms, integrate FontButton * Add docs * Add StyledText * Update package lock * Add StyledText to prop checking * Update documentation for StyledText * Add markdown prettier * Change default font size
726 B
726 B
Styled
A wrapper around Area.Text without the need to explicitly create an Area component.
import React, { Component } from 'react';
import { render, Window, App, StyledText, Box } from 'proton-native';
class Example extends Component {
render() {
return (
<App>
<Window title="Test" size={{ w: 400, h: 400 }} margined>
<Box>
<StyledText style={{ fontSize: 16 }}>
This is some text drawn onto an{' '}
<StyledText style={{ color: 'red' }}>Area!</StyledText>
</StyledText>
</Box>
</Window>
</App>
);
}
}
render(<Example />);
Props
For props, see Area.Text