Code Monkey home page Code Monkey logo

astro-boilerplate-components's People

Contributors

friendlyuser avatar ixartz avatar nomanoff avatar tropicthedev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

astro-boilerplate-components's Issues

Add target prop to NavMenuItem component

Description:

In the current implementation of the NavMenuItem component, there is no way to specify the target attribute for the <a> tag. This is essential for controlling where the new link will be opened (e.g., in a new tab, same tab, etc.).

Current Behavior:

type INavMenuItemProps = {
  href: string;
  children: string;
};

const NavMenuItem = (props: INavMenuItemProps) => (
  <li className="hover:text-white">
    <a href={props.href}>{props.children}</a>
  </li>
);

Desired Behavior:

Add a target prop to the NavMenuItem component to allow users to specify the target attribute for the tag.

type INavMenuItemProps = {
  href: string;
  children: string;
  target?: '_blank' | '_self' | '_parent' | '_top' | string;
};

const NavMenuItem = (props: INavMenuItemProps) => (
  <li className="hover:text-white">
    <a href={props.href} target={props.target}>{props.children}</a>
  </li>
);

Steps to Reproduce:

  1. Import and use the NavMenuItem component.
  2. Try to specify the target prop.
  3. Observe that the target prop is not available.

Expected Result:

Users should be able to specify the target prop to control where the link will open.

Actual Result:

The target prop is not available in the current implementation.

Additional Information:

This enhancement will provide more flexibility to users when using the NavMenuItem component, especially when they want links to open in new tabs or other specific frames.

Note: I'm happy to implement a fix for this issue.

Any contribution guidelines for this repo?

I was using the Atro Boilerplate (https://github.com/ixartz/Astro-boilerplate) and have noticed that the components do not take any style props. This was also mentioned in an issue (ixartz/Astro-boilerplate#7). As a reply it was mentioned that the pull requests are welcome for this repo. So, I was curious if I could help with that. I am new to astro and typescript and I really wanna contribute to open-sourse. So, is there anything that I can help you guys? I am acutally looking for a first issue, because I haven't done any open-source contributions before. I would be really happy for this oportunity to help and also grow my own skills.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.