Atri-Labs / atrilabs-engine

🧘‍♂️ Open-source no-code & code web app builder
https://atrilabs.com
GNU General Public License v3.0
4.13k stars 182 forks source link

Add a Badge Component #264

Closed adityaxpique closed 1 year ago

adityaxpique commented 1 year ago

The signature of badge component should be as follows:-


type BadgeProps = {
       styles: React.CSSProperties;
       custom: { 
                //The child to show inside the box. The user can drag and drop it into the box to apply it(like you can drag and drop 
                components into flexbox).
        child: React.ReactNode[];
        //The max number you show above the box.
        maxLimit: number;
        //Sets the badge as status dot;
        isStatus: boolean;
        //The text that gets displays when you hover over the badge
        tooltip: string;
        //The amount of offset in the x and y axis.
        offset: [number, number];
        //The color of the dot
        color: string;
        //The number to show in the badge
        count: number;
       };
};

export const BadgeProps: React.FC<BadgeProps> = React.forwardRef(
  (ref, props) => {
    return <div></div>;
  }
);

8

7

Potato-29 commented 1 year ago

Hi @adityaxpique , I'd like to build this component, can you assign it for me?

darshitac11 commented 1 year ago

Done! Your username is hilarious by the way @Potato-29 😆

Potato-29 commented 1 year ago

Haha thanks XD I'll start working now then.

Potato-29 commented 1 year ago

ah hey really sorry to bail out but I realized in the end that it's python and I'm not really good with it, but thanks for giving me a chance :)

darshitac11 commented 1 year ago

Sure, no problem.

However, this issue only requires knowledge of Typescript and React.

darshitac11 commented 1 year ago

@all-contributors please add @Potato-29 for userTesting

allcontributors[bot] commented 1 year ago

@darshitac11

I've put up a pull request to add @Potato-29! :tada:

Potato-29 commented 1 year ago

Thanks for adding me as a tester in contributors :)

darshitac11 commented 1 year ago

@Potato-29 since our repo follows all-contributors specification, both no-code and code contributions are celebrated and featured in our README. 💖

vikyale commented 1 year ago

Hello! I'd like to help in this issue :)

factscub commented 1 year ago

Hey. I want to work on this. Please assign it to me.

factscub commented 1 year ago

all properties in the custom object are mandatory or optional ?

cruxcode commented 1 year ago

@factscub sorry for the late reply. To start with, add the most needed custom properties first.