azouaoui-med / react-pro-sidebar

React Pro Sidebar provides a set of components for creating high level and customizable side navigation
https://azouaoui-med.github.io/react-pro-sidebar/
MIT License
1.72k stars 412 forks source link

(not bug): Can't find documentation on why I'm seeing a pro-react-sidebar::marker by default #138

Closed drewboardman closed 1 year ago

drewboardman commented 1 year ago

Screen Shot 2022-12-20 at 11 18 29 AM Screen Shot 2022-12-20 at 11 18 16 AM

I'm seeing a marker showing up by using the default pro-react-sidebar documentation. Here is an example of a component that using <MenuItem> that is displaying this ::marker.

interface ItemProps {
  title: string;
  to: string;
  icon: ReactElement;
  selected: string;
  setSelected: Dispatch<SetStateAction<string>>;
}

function Item(props: ItemProps): ReactElement {
  const theme = useTheme();
  const colors = tokens(theme.palette.mode);
  return (
    <MenuItem
      active={props.selected === props.title}
      style={{ color: colors.grey[100] }}
      onClick={() => props.setSelected(props.title)}
      icon={props.icon}
    >
      <Typography>{props.title}</Typography>
      <Link to={props.to} />
    </MenuItem>
  );
}

I'm not seeing a prop for the MenuItem component that allows disabling of this marker. Any idea on how to turn it off?

azouaoui-med commented 1 year ago

this is added by default to ul li elements, and it is removed by adding list-style-type: none; css property to ul element

it seems that you are using version 0.x, so you should import css file to apply the necessary styles for the sidebar

check the docs for v0.x here

drewboardman commented 1 year ago

Ah, I see. That's also probably why I don't have ProSidebarProvider either.

Thanks.