Tips on inserting space in materialize css?

After reviewing the documents, I couldn't find any answers to my questions. Is there a way to create some space between the buttons? Currently, they are positioned right next to each other. Thank you!

import React from "react";
import { connect } from "react-redux";

class Todo extends React.Component {

    state = {
        color: null
    }

    render() {

        let color;
        if(this.props.todo.priorityLevel === "3" ) {
             color = "#ff5252 red accent-2";
        } else if (this.props.todo.priorityLevel === "2") {
            color =  "#ff8a65 deep-orange lighten-2";
        } else {
            color = "#fff176 yellow lighten-2";
        }

        return(
            <div className={"card-panel " + color}>
                <div id="todoInfo">
                    <h2>{`Title: ${this.props.todo.todoTitle}`}</h2>
                    <span id="todoDescription">{`Description: ${this.props.todo.description}`}</span>
                    <span id="todoPriorityLevel">{`Priority Level: ${this.props.todo.priorityLevel}`}</span>
                </div>
                <div id="todoActions">
                    <button className="btn-floating btn-large cyan pulse actionButtons" onClick={()=>this.props.dispatch({type:"EDIT_TODO", id: this.props.todo.id})}>Edit</button>
                    <button className="btn waves-effect #d50000 red accent-4 pulse actionButtons" onClick={()=>this.props.dispatch({type:"DELETE_TODO", id: this.props.todo.id})}>Delete</button>
                </div>
            </div>

        )
    }
}

export default connect()(Todo);

Answer №1

For the initial button, include

style={{ marginRight: '40px !important' }}
.

Another approach is to consider utilizing <a> elements rather than <button> if you prefer a default gap.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Adaptable Material Ui Interface

I have been working on developing a web application using React JS and Material UI, but I am encountering issues with responsiveness in the app. Below is the code snippet from my head tag: <head> <meta charset="utf-8" /> <link ...

Issues with rendering in Next.jsORErrors encountered during rendering

Encountering errors while attempting to build my page using "Yarn Build" Automatically optimizing pages ... Error occurred prerendering page "/design/des". More details: https://err.sh/next.js/prerender-error: Error: Cannot find module './des.md&apos ...

Could anyone provide a detailed explanation of how model binding functions in ASP.NET?

Hey there, I've been working on sending a post request from Reactjs to an ASP.NET API using axios. Initially, I encountered a 400 Bad request error. However, after making some changes to the DTO in the backend, the request went through. But now, the d ...

Adapting npm scripts with Node.js based on the current context

Can you set up package.json to execute a different npm start script depending on the context? For instance, I want to run DEBUG=http nodemon app.js during development. However, I prefer to run node app.js in production. ...

Incorporate a Flask variable into a webpage seamlessly without refreshing the page

I am facing a challenge in importing the variable test_data from Flask to my webpage without having to reload it. I have tried clicking a button, but haven't been successful so far. Any suggestions? Flask: @blueprint.route('/data_analysis' ...

The blending of Angular 4 HTTP responses creates a jumbled mess

I have encountered an issue while using Angular 4 across different browsers like safari, chrome, and Firefox. In my Angular 4 application, I am sending XHR Requests via httpclient to interact with a REST service. The communication is done in JSON format. ...

Solving Angular Circular Dependencies

My popupservice allows me to easily open popup components: export class PopupService { alert() { this.matdialog.open(PopupAlertComponent); } yesno() { this.matdialog.open(PopupYesNoComponent); } custom() { this.matdialog.open(PopupCustomCompon ...

Designated location for downloading specified by the user

I've been searching for a while now and I can't seem to find a satisfactory answer. Essentially, I have a website where users can input values and download a specific file based on those values. Everything is functional, but I want to give the u ...

Understanding the impact of event loop blocking and the power of asynchronous programming in Node JS

I am new to Node.js programming and I really want to grasp the core concepts and best practices thoroughly. From what I understand, Node.js has non-blocking I/O which allows disk and other operations to run asynchronously while JavaScript runs in a single ...

Having an issue with the Show/Hide Javascript toggle on the same page. Multiple hidden texts are appearing simultaneously. Seeking a solution without the use of JQuery

This code is functioning efficiently. I am looking for a way to display and conceal various texts using different expand/hide links within multiple tables on the same page. I prefer to achieve this without using JQuery, just like in this straightforward sc ...

The hover effect does not seem to be functioning properly within the <th>

I've been working on a tooltip feature that displays data in a message box when hovering over an icon based on its attribute. The following code is implemented for the mouseenter event. <span class='csTip fa fa-info-circle' csTipTerm=&a ...

Replicate the action of highlighting a section of a website and copying it to the clipboard using JavaScript

I am currently in the process of transferring an outdated application to a new platform, but I'm facing difficulty understanding the changed JavaScript code. My goal is to find a parent HTML element named "output" and then select all its child elemen ...

The event was triggered, however, some sections of the code did not run

I am currently working on a project called lan-info on GitHub. Here is the code snippet that I am using: let arpSweepCommand = './arpSweep.sh'; app.get('/arp', (req, res) => { console.log('we have a working signal!'); ...

What is the most effective way to iterate through an array of objects and retrieve the results in a key-value format?

I am dealing with an array of objects that may seem a bit complex initially, but I will simplify it as much as possible. Each object in the array has properties like Engineering, Environment, and others, each containing a sub-object called radars. The rada ...

Struggling to create a mobile-friendly design

I've successfully created a dynamic world map using D3.js, but I need some guidance on making it responsive across various screen sizes. You can view the interactive world map here. Credentials to access the map: Username: DXLdemo Password: ...

I am feeling lost when it comes to managing state/props and making changes to the user interface in

My React app uses componentDidMount to fetch data from an external API and updates every second. I want the UI to display the current track name when it changes. While my code works fine with console logging, the UI fails to update. I am under the impress ...

Encountering an error: Unexpected syntax with 'export'

Currently, I am encountering an issue with this error when running my jest tests. In our project, we utilize a package that ultimately relies on the D3 library. Whenever I execute a test involving that particular component, I encounter the following messa ...

Verify the string to see if it contains a Steam game key

I am seeking assistance with a task that involves verifying whether a specific string contains a particular pattern: Below are several strings in an array: [ "please use this key: ')D9ad-98ada-jiada-8a8aa'", "kK8AD-AODK8-ADA7A", "heres a fr ...

The escape character appears to be misunderstood, causing an error due to an invalid escape sequence

When using the following syntax: executeJSCommand("location.href='StatusDetails.php?CHLD=1\&JNum=1024&JTitle=';"); An error occurs displaying: Invalid Escape Sequence ...

"JavaScript: Issue Encountered While Converting Hexadecimal to Decimal

I've been working on a custom function to convert hexadecimal to decimal in my Scratch project: function Hex2Decimal(hex){ var deci = 0; var num = 1; var hexstr = String(hex); hexstr = hexstr.toLowerCase(); var expon = 0; for( ...