Skip to content

feat(): Introduce side by side buttons #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 11, 2020
Merged

Conversation

imklau
Copy link
Contributor

@imklau imklau commented Feb 27, 2020

Proposed changes

I hope that <div> element won't be a big problem for you. Couldn't find any reasonable solution for this issue.

I change the "Media Icons" heading to "Reference Buttons" in the styleguide. I'm not sure if that's entirely correct, but media icons seemed to be something other than buttons.

Zrzut ekranu 2020-02-27 o 12 31 50

Related issues (optional)

Closes: #661

@imklau imklau requested a review from sanscontext February 27, 2020 11:32
@imklau imklau self-assigned this Feb 27, 2020
@sanscontext
Copy link
Contributor

Looks fine to me. I'm not clear if there are any gotchas or issues with using <div> tags, we just need to make sure they're on separate lines from any markdown formatting as far as I know. (If there's anything else we should watch out for, happy to hear it. :) )

So just to make sure I understand what this does, wrapping a pair of buttons in <div class="double"> is what makes them render side by side?

@imklau
Copy link
Contributor Author

imklau commented Mar 3, 2020

Ohh I'm sorry, I must have missed your comment here @sanscontext.

Well, that's right - I couldn't place them next to each other without any wrapper element. CSS display property needs to be attached to the "parent element" and that's why I had to add another HTML tag. I know it doesn't look nice :<

Maybe I'll show you a different solution 🤔
It's possible to create something like this:

{% include components/double-buttons.html
  href1="/connections/sources/catalog/"
  icon1="media/icon-academy.svg"
  title1="Sources Catalog"
  content1="Lorem ipsum dolor sit amet consectetur, adipisicing elit."
  variant1="related" 
  href2="/connections/sources/catalog/"
  icon2="media/icon-academy.svg"
  title2="Segment"
  content2="Lorem ipsum dolor  sit amet consectetur, adipisicing elit."
%}

inside the components/double-buttons would be that <div class="double then.
but I don't think it's easy to use 😅

However, it's totally up to you now. I'm not going to use this element that much.
Just let me know what would be the best option for you.

@sanscontext
Copy link
Contributor

Let's keep it with the div tag! I think that's much easier to use - was just making sure I understood what was built in case there were questions later. :)

@sanscontext
Copy link
Contributor

Gah, sorry, I thought I merged this! Doing that now.

@sanscontext sanscontext merged commit 11ffbdd into master Mar 11, 2020
@sanscontext sanscontext deleted the 661-side-by-side-buttons branch March 19, 2020 23:55
bot-docsteam added a commit that referenced this pull request Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add side-by-side button options
2 participants