Last active
February 14, 2022 01:40
-
-
Save xiongemi/d30a77b3089d856b891fc7401747fe1a to your computer and use it in GitHub Desktop.
poem of the day component expo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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