Skip to content

Instantly share code, notes, and snippets.

@xiongemi
Last active February 14, 2022 01:40
Show Gist options
  • Save xiongemi/d30a77b3089d856b891fc7401747fe1a to your computer and use it in GitHub Desktop.
Save xiongemi/d30a77b3089d856b891fc7401747fe1a to your computer and use it in GitHub Desktop.
poem of the day component expo
import React from 'react';
import { SafeAreaView, ScrollView } from 'react-native';
import { Provider as PaperProvider } from 'react-native-paper';
import PoemOfTheDay from '../components/poem-of-the-day/poem-of-the-day';
const App = () => {
return (
<PaperProvider>
<SafeAreaView>
<ScrollView contentInsetAdjustmentBehavior="automatic">
<PoemOfTheDay></PoemOfTheDay>
</ScrollView>
</SafeAreaView>
</PaperProvider>
);
};
export default App;
import React from 'react';
import { Card, Title, Paragraph, Subheading } from 'react-native-paper';
/* eslint-disable-next-line */
export interface PoemOfTheDayProps {}
export function PoemOfTheDay(props: PoemOfTheDayProps) {
return (
<Card>
<Card.Cover
source={{ uri: `https://picsum.photos/300/200` }}
/>
<Card.Content>
<Title>Ozymandias</Title>
<Subheading>Percy Bysshe Shelley</Subheading>
<Paragraph>
I met a traveller from an antique land {'\n'}
Who said: Two vast and trunkless legs of stone {'\n'}
Stand in the desert...Near them, on the sand, {'\n'}
Half sunk, a shattered visage lies, whose frown,{'\n'}
And wrinkled lip, and sneer of cold command, {'\n'}
Tell that its sculptor well those passions read {'\n'}
Which yet survive, stamped on these lifeless things, {'\n'}
The hand that mocked them, and the heart that fed: {'\n'}
And on the pedestal these words appear: {'\n'}
'My name is Ozymandias, king of kings: {'\n'}
Look on my works, ye Mighty, and despair!' {'\n'}
Nothing beside remains. Round the decay{'\n'}
Of that colossal wreck, boundless and bare{'\n'}
The lone and level sands stretch far away.
</Paragraph>
</Card.Content>
</Card>
);
}
export default PoemOfTheDay;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment