The Newspaper App is a simple React application that fetches and displays top headlines from a news API. It features a responsive design with cards for each news article and a dynamic theme based on the API data.
- Installation
- Usage
- Components
- CSS
- License
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/newspaper-app.git
and navigate to the project directory:cd newspaper-app
- Install dependencies:
npm install
- Start the development server:
npm start
The app should now be running on http://localhost:3000
.
The application consists of two main components: NewsArea
and NewsItem
. The NewsArea
component fetches data from the news API and passes the article data to the NewsItem
component, which displays each article in a card format.
- NewsArea: Fetches news data from the API and maps each article to a
NewsItem
component. - NewsItem: Displays the details of a single news article including the title, description, and an image.
The CSS for this project is managed through a combination of Bootstrap classes and custom styles defined in the App.css
file. Each card is styled to be responsive and visually appealing.